package com.mjk.common.ai.work.admin;

import com.mjk.common.ai.dto.StatisticDto;
import com.mjk.common.ai.service.StatisticService;
import com.mjk.common.base.error.BeeError;
import com.mjk.common.base.request.BaseDto;
import com.mjk.common.base.response.BeeResponse;
import com.mjk.common.base.work.BaseWork;
import jakarta.annotation.Resource;

public class StatisticWork extends BaseWork {

    @Resource
    private StatisticService statisticService;

    public BeeResponse statistic(BaseDto dto) {
        StatisticDto result = new StatisticDto();
        result.setKbStatistic(statisticService.calKbStat());
        result.setUserStatistic(statisticService.calUserStat());
        result.setTokenCostStatistic(statisticService.calTokenCostStat());
        result.setConvStatistic(statisticService.calConvStatistic());
        result.setImageCostStatistic(statisticService.calImageCostStat());
        return BeeError.BEE_SUC.tranceError(result);
    }
}
